using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AssetFrame.Message;
using System.Reflection;
using SysFrame.BP;
using SysFrame.Message;

namespace AssetFrame.BP
{
    /// <summary>
    /// asset_a4方法
    /// </summary>
    public class BLLasset_a4
    {
        public Iasset_a4 interface_asset_a4;

        public BLLasset_a4()
        {
            object obj = BPBase.GetAchieve("AssetFrame.BP","asset_a4");
            interface_asset_a4 = (Iasset_a4)obj;
        }


        /// <summary>
        /// 得到asset_a4实体
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public List<Msasset_a4> Getasset_a4MsByQuery(MsQuery msq)
        {
            return interface_asset_a4.Getasset_a4MsByQuery(msq);
        }

        /// <summary>
        /// 通过ASSET_A4_AUTOID得到实体
        /// </summary>
        /// <param name="ASSET_A4_AUTOID">ID</param>
        /// <returns>实体</returns>
        public Msasset_a4 Getasset_a4MsByKey(string ASSET_A4_AUTOID)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and ASSET_A4_AUTOID='" + ASSET_A4_AUTOID + "' ";
            List<Msasset_a4> lstData = Getasset_a4MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        ///  保存asset_a4信息
        /// </summary>
        /// <param name="ms">实体信息</param>
        /// <returns>消息</returns>
        public MsReturned Saveasset_a4(Msasset_a4 ms)
        {
            return interface_asset_a4.Saveasset_a4(ms);
        }

        /// <summary>
        /// 得到数据类型
        /// </summary>
        /// <param name="msquery">条件</param>
        /// <returns>数据类型</returns>
        public MsReturned Getasset_a4ByQuery(MsQuery msquery)
        {
            return interface_asset_a4.Getasset_a4ByQuery(msquery);
        }

        /// <summary>
        /// 删除asset_a4
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deleteasset_a4ByQuery(MsQuery msq)
        {
            return interface_asset_a4.Deleteasset_a4ByQuery(msq);
        }
        /// <summary>
        /// 删除asset_a4
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deleteasset_a4ByKey(string ASSET_A4_AUTOID)
        {
            MsQuery msquery = new MsQuery();
            
             if (ASSET_A4_AUTOID.IndexOf(",") > 0)
            {
                msquery.strquery += " and ASSET_A4_AUTOID in (" + ASSET_A4_AUTOID + ") ";
            }
            else
            {
                msquery.strquery += " and ASSET_A4_AUTOID='" + ASSET_A4_AUTOID + "' ";
            }
            return interface_asset_a4.Deleteasset_a4ByQuery(msquery);
        }
    }
}
